Many types of computer-based resources, including shared resources, are utilized with synchronization processes to ensure proper and efficient use of those resources. Such resources include, for example, storage devices and clusters, databases, and computer processors. Synchronization may need to occur, for example, when one or more processing threads concurrently need use of those resources. Often when multiple threads need use of a single resource or a resource that requires atomic access (e.g., a memory object) a synchronization object (e.g., a semaphore object) may be employed to manage use of the resource between the threads. Other resources can include, for example, linked lists, queues, or storage offsets (e.g., that require access serialization). For example, the synchronization object may place some threads in a waiting queue while allowing another thread to utilize the resource.
One aspect of implementing such resources may be handling instances of resources that become unavailable. For example, a storage cluster may reach or be close to exceeding capacity and threads utilizing the resources may need to obtain resources elsewhere or end processing. If the process is currently in a synchronization object queue waiting for a resource, the synchronization object may be set up to perform a function to release waiting processes and allow them to seek resources elsewhere or end.
However, some process(es) may be processing a request for obtaining a lock on a resource before waiting processes are released. In that case, the process may request the resource from the synchronization object after the function to release waiting processes is already performed and the process may subsequently be put in a queue to wait for an unavailable resource. This may cause a “timeout” or other detrimental conditions to occur that negatively impact proper and efficient processing.